<extend name="Public/base"/>
<block name="style">
<link rel="stylesheet" type="text/css" href="__STATIC__/bootstrap-fileinput/css/fileinput.css">	
</block>
<block name="content">
<h3>艺术家管理</h3>
<div class="panel panel-default">
	<div class="panel-heading"><{:isset($data['id'])?'编辑':'新增'}>艺术家</div>
 	<div class="panel-body">
    	<form class="form-horizontal" enctype="multipart/form-data" action="<{:U()}>" name="songs"  method="post">																	
    		<div class="form-group">	
    			<label class="col-sm-2 control-label">艺术家名称</label>
    			<div class="col-sm-3">
    				<input  type="text" name="name" class="form-control" value="<{$data.name|default=''}>" >   				
    			</div>
    			<span class="help-inline">此项不能为空</span>
    	    </div>		
    
    	    <div class="form-group">		
    			<label class="col-sm-2 control-label">所属类别</label>
    			<div class="col-sm-2">
    				<input type="text" class="hide"  name="type_name" value="<{$data.type_name|default='其他'}>">
    				</volist>
    				<select name="type_id" class="form-control set-name">
    				<option value="<{$data.type_id|default='0'}>"><{$data.type_name|default='请选择类别'}></option>
    				<volist name=":get_music_find('ArtistType')" id="type">
    				<option value="<{$type.id}>" ><{$type.name}></option>
    				</volist>
    				</select>
    			</div>	
    	    </div>		
    	
    	    <div class="form-group">		
    			<label class="col-sm-2 control-label">所属地区</label>
    			<div class="col-sm-2">
    				<input type="text"  class="hide" name="region" value="<{$data.region|default='其他'}>">
    				<select  name="region_id"  class="form-control set-name">
    					<option value="<{$data.region_id|default='0'}>"><{$data.region|default='请选择地区'}></option>
    					<volist name=":get_music_find('region')" id="region">
    					<option value="<{$region.id}>" ><{$region.name}></option>
    					</volist>
    				</select>
    			</div>	
    	    </div>		
    
    	    <div class="form-group">		
    			<label class="col-sm-2 control-label">字母索引</label>
    			<div class="col-sm-1">
    				<input type="text"  class="form-control" name="sort" value="<{$data.sort|default=''}>">  				
    	    	</div>
    	    	<span class="help-inline">字母A~Z，不填表示其它！</span>
    	    </div>			
    	
			<div class="form-group">	
    			<label class="col-sm-2 control-label">艺术家封面</label>
    			<div class="col-sm-5">
    				<div class="input-group">
    					<input type="hidden" name="cover_id" id="cover_id" value="<{$data.cover_id| default='0'}>">
    					<input type="text" class="form-control" name="cover_url" id="cover"  value="<notempty name="data['cover_id']"> <{$data.cover_url}></notempty>">
    					<a href="javascript:;" class="input-group-addon up_pic" rel_url="#cover" rel_fileid="#cover_id" url="<{:U('File/uploadPicture',array('session_id'=>session_id(),'type'=>'artist'))}>">
                        	<span class="fa fa-cloud-upload"></span>
                    	</a>
                    	<notempty name="data['cover_id']">
                    	<a href="javascript:;" class="input-group-addon look_pic" >预览</a>
                    	</notempty>
                    </div>    				
    			</div>
    			<span class="help-block">本地上传自动获取URL,可填写外链</span>
    		</div>  
			
    	    <div class="form-group">		
    			<label class="col-sm-2 control-label ">点击次数</label>
    			<div class="col-sm-1">
    				<input type="text" class="form-control"  value="<{$data.hits|default=''}>" name="hits">
    			</div>
    			
    			<label class="col-sm-1 control-label ">评分</label>
    			<div class="col-sm-1">
    				<input type="text" class="form-control input-mini"  value="<{$data.rater|default='0'}>" name="rater">    				
    			</div>
    			<span class="help-block">最高10分</span>
    	    </div>			
	
    		<div class="form-group">	
    			<label class="col-sm-2 control-label">是否推荐</label>
    			<div class="col-sm-6 controls">
					<input class="hide" name="recommend" value="<{$data.recommend |default='0'}>">
					<div class="switch-wrapper">
						<span class="switch-enable">是</span>
						<span class="switch-disable selected">否</span>
					</div>
					<present name="data">
					<if condition="$data.recommend == 1">					
						<script type="text/javascript">
							$('.switch-disable').removeClass('selected');
							$('.switch-enable').addClass('selected');
						</script>	
					</if>
					</present>
                </div>						
    		</div>
    		
    		<div class="form-group">	
    			<label class="col-sm-2 control-label">简介</label>
    			<div class="col-sm-5">
    				<textarea name="introduce" class="form-control" style="width:100%;height:100px;"><{$data.introduce|default=''}></textarea>
    	    	</div>
    	    </div>	
    		
    		<div class="form-group">	
				<label class=" col-sm-2 control-label">标题</label>
				<div class="col-sm-3">
					<input  type="text"  name="title" value="<{$data.title|default=''}>" class="form-control">					
				</div>
				<span class="help-block">SEO标题</span>
			</div>	
			
			<div class="form-group">	
				<label class=" col-sm-2 control-label">关键字</label>
				<div class="col-sm-3">
					<input  type="text"  name="kerwords" value="<{$data.kerwords|default=''}>" class="form-control">					
				</div>
				<span class="help-block">SEO关键字</span>
			</div>		
		
    	    <div class="form-group">		
    			<label class="col-sm-2 control-label">描述</label>
    			<div class="col-sm-5">	
    				<textarea name="description" class="form-control" style="width:100%;height:100px;" ><{$data.description|default=''}></textarea>
    	    	</div>
    	    </div>			 
									
    		<div class="form-group">
    			<input type="hidden" name="status" value="<{$data.status|default=''}>">   		
    			<input type="hidden" name="id" value="<{$data.id|default=''}>">
            	<div class="col-sm-4 col-sm-offset-2">
                	<button class="btn btn-default" type="button" onclick="javascript:history.back(-1);return false;">取消</button>
                	<button class="btn btn-primary ajax-post" target-form="form-horizontal"  type="submit">保存</button>
            	</div>
        	</div>
        </form>
	</div>
</div>													
<div class="col-md-12 upload-content" id="file-up">		                    	
	<div class="upload-box">
		<div class="dz-default dz-message  fileinput-button">
			<span>点击或将文件拖拽到这里</span>		                    		
		    <input id="fileupload" type="file" name="user_file" multiple>
	    </div>
	    <div id="files" class="files"></div>
		<div id="progress" class="progress">
	        <div class="progress-bar progress-bar-info"></div>
	    </div>
	</div>
</div>  
</block>
<block name="script">
<script type="text/javascript" src="__STATIC__/bootstrap-fileinput/js/fileinput.js"></script>
<script type="text/javascript"  src="__JS__/other.js"></script>
<script type="text/javascript">
highlight_subnav("<{:U('Songs/index')}>","<{:U('Artist/index')}>");
var savePicPath	=	"<{:trim(C('ADMIN_UPPIC_PATH'))}>";

</script>
</block>	


